package com.RMP
{
    import flash.display.*;
    import flash.events.*;
    import flash.text.*;
    import com.greensock.*;

    public class NavText extends MovieClip
    {
        public var field:TextField;
        var myColor:String;
        var fadeSpeed:Number;
        public var btnOver:Sprite;
        public var idNum:int;
        public var textFormat:Object;
        public var idFilter:int;
        public var btn:Sprite;
        var myRoot:MovieClip;
        var myText:String;

        public function NavText(param1:MovieClip, param2:String, param3:int, param4:String, param5:int) : void
        {
            myRoot = param1;
            myText = param2;
            idNum = param3;
            idFilter = param5;
            myColor = param4;
            buildField();
            myRoot.stage.addEventListener(Event.RESIZE, onResizer);
            doResize();
            return;
        }

        function buildField() : void
        {
            textFormat = new TextFormat();
            textFormat.font = new HelveticaLightEmbed().fontName;
            textFormat.size = 14;
            textFormat.letterSpacing = 0;
            textFormat.leading = -4;
            textFormat.leftMargin = 0;
            textFormat.rightMargin = 0;
            textFormat.color = myColor;
            btnOver = new Sprite();
            btnOver.useHandCursor = true;
            btnOver.mouseEnabled = true;
            btnOver.buttonMode = true;
            btnOver.graphics.beginFill(10066329, 0);
            btnOver.graphics.drawRect(0, 0, 1, 1);
            btnOver.graphics.endFill();
            addChild(btnOver);
            btn = new Sprite();
            btn.useHandCursor = true;
            btn.mouseEnabled = true;
            btn.buttonMode = true;
            btn.mouseChildren = false;
            field.autoSize = "left";
            field.antiAliasType = AntiAliasType.ADVANCED;
            field.gridFitType = GridFitType.PIXEL;
            field.selectable = false;
            field.embedFonts = true;
            field.multiline = false;
            field.htmlText = myText;
            field.setTextFormat(textFormat);
            field.y = -1;
            btn.addChild(field);
            addChild(btn);
            return;
        }

        function doResize() : void
        {
            return;
        }

        function onResizer(event:Event)
        {
            doResize();
            return;
        }

        public function fadeInShell() : void
        {
            TweenMax.to(this, fadeSpeed, {alpha:1, overwrite:true});
            return;
        }

    }
}
